package com.ticket.sass.common.entity.tenant;

import com.baomidou.mybatisplus.annotation.*;
import com.ticket.sass.common.entity.tenant.enums.OrderTicketDetailEnterStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author ywb
 * @since 2024-03-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("order_ticket_details")
@ApiModel(value="OrderTicketDetailsEntity对象", description="")
public class OrderTicketDetailEntity implements Serializable {
    @ApiModelProperty(value = "影票订单明细ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "票号")
    private String ticketCode;

    @ApiModelProperty(value = "座位 id")
    private String seatId;

    @ApiModelProperty(value = "座位编码")
    private String seatCode;
    
    @ApiModelProperty(value = "座位号")
    private String seat;

    @ApiModelProperty(value = "座位列")
    private String seatCol;

    @ApiModelProperty(value = "座位行")
    private String seatRow;

    @ApiModelProperty(value = "国标二维码")
    private String gbCode;
    
    @ApiModelProperty(value = "入场码")
    private String enterCode;

    @ApiModelProperty(value = "入场状态")
    private OrderTicketDetailEnterStatus enterStatus;
    
    @ApiModelProperty(value = "支付票价")
    private BigDecimal price;

    @ApiModelProperty(value = "票面价")
    private BigDecimal parPrice;

    @ApiModelProperty(value = "影院手续费")
    private BigDecimal handleFee;

    @ApiModelProperty(value = "增值服务费")
    private BigDecimal serviceFee;

    @ApiModelProperty(value = "渠道服务费")
    private BigDecimal channelServiceFee;

    @ApiModelProperty(value = "影票订单ID")
    private Long orderTicketId;

    @ApiModelProperty("用户ID")
    private Long userId;
    
    @ApiModelProperty(value = "影院ID")
    private Long cinemaId;
    
    @ApiModelProperty(value = "租户ID")
    private Long tenantId;
    
    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    public LocalDateTime createdAt;
    
    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    public LocalDateTime updatedAt;
    
    @TableField(select = false)
    @ApiModelProperty(value = "删除时间")
    @TableLogic(value = "null", delval = "now()")
    public LocalDateTime deletedAt;

    @ApiModelProperty(value = "检票时间")
    private LocalDateTime checkedAt;

    @TableField(exist = false)
    private OrderTicketEntity orderTicket;
    
}
